﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="Register" %>

<%@ Register assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<asp:Content ID="ContentHead" ContentPlaceHolderID="head" runat="server">
    <link href="Styles/MyStyle.css" rel="Stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:UpdatePanel ID = "UpdatePanel4" runat="server" UpdateMode="Conditional">
<ContentTemplate>
    
    <table>
    <tr>
        <td colspan="3">
            <h3>Đăng ký</h3></td>
    </tr>
    <tr>
        <td>
            <p>Tên đăng nhập</p></td>
        <td>
            <asp:Label ID="_lblUsername" runat="server">
            </asp:Label>
            <asp:TextBox ID="_txtUsername" runat="server" Width="170px" 
                onvaluechanged="_txtUsername_ValueChanged" AutoPostBack="true">
            </asp:TextBox>
        </td>
        <td>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                ErrorMessage="Tên đăng nhập còn trống" ControlToValidate="_txtUsername" 
                Display="None" SetFocusOnError="True">*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            <p>Mật khẩu</p></td>
        <td>
            <asp:TextBox ID="_txtPassword1" runat="server" Width="170px" Password="True" 
                TabIndex="1">
            </asp:TextBox>
        </td>
        <td>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                ErrorMessage="Mật khẩu không được trống" ControlToValidate="_txtPassword1" 
                SetFocusOnError="True">*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            <p>Nhập lại mật khẩu</p></td>
        <td>
            <asp:TextBox ID="_txtPassword2" runat="server" Width="170px" Password="True" TabIndex="2">
            </asp:TextBox>
        </td>
        <td>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                ErrorMessage="Nhập lại mật khẩu" ControlToValidate="_txtPassword2" 
                SetFocusOnError="True">*</asp:RequiredFieldValidator>
            <asp:CompareValidator ID="CompareValidator1" runat="server" 
                ErrorMessage="CompareValidator" ControlToCompare="_txtPassword1" 
                ControlToValidate="_txtPassword2" SetFocusOnError="True">*</asp:CompareValidator>
        </td>
    </tr>
    <tr>
        <td>
            <p>Họ tên</p></td>
        <td>
            <asp:TextBox ID="_txtFullName" runat="server" Width="170px" TabIndex="3">
            </asp:TextBox>
        </td>
        <td>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                ErrorMessage="Điền họ tên" ControlToValidate="_txtFullName" 
                SetFocusOnError="True">*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td >
            <p>Giới tính</p></td>
        <td>
            <dx:ASPxRadioButton ID="_radMale" runat="server" Checked="True" GroupName="Sex" 
                Text="Nam" TabIndex="4" Layout="Flow">
            </dx:ASPxRadioButton>
            <dx:ASPxRadioButton ID="_radFemale" runat="server" Text="Nữ" GroupName="Sex" 
                TabIndex="5" Layout="Flow">
            </dx:ASPxRadioButton>
        </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td >
            <p>Ngày sinh</p></td>
        <td>
            <dx:ASPxDateEdit ID="_datBirthday" runat="server" EditFormat="Custom" 
                TabIndex="6" CssClass="FloatLeft">
            </dx:ASPxDateEdit>
        </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td >
            <p>CMND</p></td>
        <td>
            <asp:TextBox ID="_txtIDNo" runat="server" Width="170px" TabIndex="6">
            </asp:TextBox>
        </td>
        <td>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                ControlToValidate="_txtIDNo" ErrorMessage="Chỉ nhập số có 9 chữ số" 
                ValidationExpression="\d{9}" SetFocusOnError="True">*</asp:RegularExpressionValidator>
        </td>
    </tr>
    <tr>
        <td >
            <p>Địa chỉ</p></td>
        <td>
            <asp:TextBox ID="_txtAddress" runat="server" Width="170px" TabIndex="7">
            </asp:TextBox>
        </td>
        <td>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                ErrorMessage="Điền địa chỉ" ControlToValidate="_txtAddress" 
                Display="Dynamic">*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            <p>Email</p></td>
        <td>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <asp:Label ID="_lblEmail" runat="server">
            </asp:Label>
            <asp:TextBox ID="_txtEmail" runat="server" Width="170px" AutoPostBack="true" 
                ontextchanged="_txtEmail_TextChanged" TabIndex="8" CssClass="style1">
            </asp:TextBox>
        </ContentTemplate>
        </asp:UpdatePanel>
        </td>
        <td>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                ErrorMessage="RegularExpressionValidator" ControlToValidate="_txtEmail" 
                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                Display="Dynamic" SetFocusOnError="True">*</asp:RegularExpressionValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                ErrorMessage="Địa chỉ email không được trống" 
                ControlToValidate="_txtEmail" SetFocusOnError="True">*</asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            <p>Điện thoại</p></td>
        <td>
            <asp:TextBox ID="_txtPhoneNo" runat="server" Width="170px" TabIndex="9">
            </asp:TextBox>
        </td>
        <td>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                ControlToValidate="_txtPhoneNo" ErrorMessage="Số có 10 - 11 chữ số" 
                ValidationExpression="\d{10,11}" Display="Dynamic">*</asp:RegularExpressionValidator>
        </td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
        <td  >
            <dx:ASPxCaptcha ID="_captcha" runat="server" CodeLength="6" TabIndex="10" 
                VerticalAlign="top" TextBox-Position="Bottom" Width="200px" 
                TextBoxStyle-Width="170" LoadingPanelImage-Width="170">
                <ValidationSettings ErrorText="Mã kiểm tra chưa đúng">
                </ValidationSettings>
                <RefreshButton Text="Hình khác">
                </RefreshButton>

                <TextBox LabelText="Nhập các ký tự ở trên:"/>

                <TextBoxStyle Width="170px"></TextBoxStyle>
            </dx:ASPxCaptcha>
        </td>
        <td></td>
    </tr>
    <tr>
        <td colspan="3">
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
        </td>
    </tr>
    <tr>
        <td colspan="3">
            <asp:Label ID="_lblMessage" runat="server" ForeColor="#110000" 
                Text="Email và chứng minh nhân dân là những thông tin quan trọng. Xin hãy nhập chính xác." 
                Wrap="True">
            </asp:Label>
            </td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>
            
            <asp:Button CssClass="Button" AutoPostBack="true" ID="_btnOk" runat="server" 
                onclick="_btnOk_Click" Text="Đăng ký" ></asp:Button>
            <asp:Button CssClass="Button" AutoPostBack="true" ID="_btnCancel" 
                runat="server" CausesValidation="False" 
                onclick="_btnCancel_Click" Text="Hủy bỏ" PostBackUrl="~/Homepage.aspx">
            </asp:Button>

        </td>
        <td >
            
        </td>
    </tr>
    </table>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>


